<?php

namespace app\v1\model;

use think\Model;
/**
 * 地区规格类
 */
class Specifications extends Model
{
    public function GetList($option)
    {
        $buildDb = function () use ($option) {
            $db = $this->where('state', 1);

            if(array_key_exists('name', $option) &&!empty($option['name'])) {
                $db = $db->where('name', $option['name']);
            }

            return $db;
        };
        $list = $buildDb()->select();

        return Result(1, '', [
            'list' => $list
        ]);

    }
}
